import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_website/responsive.dart';
/**
 * Create by laoge
 * on 2021/5/28 0028
 */

Row header(BuildContext context) {
  return Row(
    children: [
      Expanded(
          flex: 1,
          child: Container(
            alignment: Responsive.isDesktop(context)?Alignment.centerRight:Alignment.centerLeft,
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                if(!Responsive.isDesktop(context))
                Builder(builder: (context){
                  return GestureDetector(
                    onTap: (){
                      Scaffold.of(context).openDrawer();
                    },
                    child: Icon(Icons.menu),
                  );
                }),
                SizedBox(width: 5,),
                Text("CV大师兄",
                    style: Theme.of(context)
                        .textTheme
                        .apply(bodyColor: Colors.white)
                        .headline5)
              ],
            ),
          )),
      if(Responsive.isDesktop(context))
      Expanded(
          flex: 5,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Text(
                "首页",
                style: Theme.of(context)
                    .textTheme
                    .apply(bodyColor: Colors.white)
                    .headline6,
              ),
              Text(
                "产品中心",
                style: Theme.of(context)
                    .textTheme
                    .apply(bodyColor: Colors.white)
                    .headline6,
              ),
              Text(
                "解决方案",
                style: Theme.of(context)
                    .textTheme
                    .apply(bodyColor: Colors.white)
                    .headline6,
              ),
              Text(
                "案例",
                style: Theme.of(context)
                    .textTheme
                    .apply(bodyColor: Colors.white)
                    .headline6,
              ),
              Text(
                "关于我们",
                style: Theme.of(context)
                    .textTheme
                    .apply(bodyColor: Colors.white)
                    .headline6,
              ),
            ],
          ))
    ],
  );
}
